package o;

import com.huawei.appgallery.foundation.account.bean.UserSession;
import com.huawei.appgallery.jsonkit.api.annotation.FieldSecurity;
import com.huawei.appgallery.jsonkit.api.annotation.SecurityLevel;
import java.util.TimeZone;
import java.util.UUID;

public abstract class brj extends cvs {
    private static final String API = "client-appgallery";
    public static final String JGW_URL = "jgw.url";
    private static final String TAG = "JGWHttpsReq";
    private String appId_;
    private final int clientVersionCode_;
    private final String clientVersionName_;
    private final String deliverRegion_;
    @FieldSecurity(security = SecurityLevel.PRIVACY)
    private String deviceIdType_;
    @FieldSecurity(security = SecurityLevel.PRIVACY)
    private String deviceId_;
    @FieldSecurity(security = SecurityLevel.PRIVACY)
    private String deviceType_;
    private String domainId_;
    private String requestId_;
    @FieldSecurity(security = SecurityLevel.PRIVACY)
    private String serviceToken_;
    private final String timeZone_;

    public abstract String ˏ();

    protected brj(String str, bqv o_bqv) {
        this();
        if (str == null) {
            str = "";
        }
        this.appId_ = str;
        this.domainId_ = o_bqv.ˎ();
    }

    private static String ˋ() {
        return UUID.randomUUID().toString().replace("-", "");
    }

    protected brj() {
        this.appId_ = "";
        this.requestId_ = ˋ();
        this.targetServer = "jgw.url";
        this.clientVersionCode_ = bsv.ˎ();
        this.clientVersionName_ = bsv.ˋ();
        setStoreApi(API);
        setMethod_(ˏ());
        setLocale_(doi.ॱ());
        this.timeZone_ = TimeZone.getDefault().getID();
        this.deliverRegion_ = eqp.ॱ();
        ˎ();
        this.domainId_ = bqy.ˋ().ˎ();
    }

    private void ˎ() {
        UserSession instance = UserSession.getInstance();
        if (instance.isLoginSuccessful()) {
            this.serviceToken_ = instance.getServiceToken();
            this.deviceType_ = instance.getDeviceType();
            this.deviceId_ = instance.getDeviceId();
        }
        this.deviceIdType_ = String.valueOf(new bjy(ContentManager.getInstant().getContext()).ॱ().ॱ);
    }

    protected void ॱ(bqv o_bqv) {
        this.domainId_ = o_bqv.ˎ();
    }

    public String ˊ() {
        return this.appId_;
    }
}
